//
//  MerchantDescTableViewCell.m
//  UI_HLJ_Frame
//
//  Created by dllo on 15/7/10.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "MerchantDescTableViewCell.h"

@implementation MerchantDescTableViewCell

- (void)dealloc
{
    [_desc release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.desc = [[UILabel alloc] init];
        [self.contentView addSubview:self.desc];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.desc.numberOfLines = 0;
    self.desc.lineBreakMode = 1;
    
    // 根据文本计算高度,限制一个文本的最大范围(375,0)
    // 第二个属性作用:指定一个属性来定义对应文本和字体所占用的高度
    self.desc.frame = CGRectMake(10,0, self.contentView.frame.size.width-20, self.contentView.frame.size.height);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
